<!---->
<%= form_for(:session, :url => {:action => 'update'}, :method => 'put', :html => {:class=>'form-horizontal'}) do |t| %>
	<fieldset>
		<legend>
    <%= link_to '友情链接列表', links_path %>
    </legend>
  <div class="control-group">
    <label class="control-label">名称</label>
    <div class="controls">
    <%= t.text_field :title, :value => @link.title %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">地址</label>
    <div class="controls">
    <%= t.text_field :linkto, :value => @link.linkto %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">图片</label>
    <div class="controls">
      <%= image_tag @link.image_url(:preview).to_s %><br />
      <%= t.file_field :image %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">状态</label>
    <div class="controls">
      <%= radio_button_tag 'session[status]',0, true, :class => 'new'  %>启用
      <%= radio_button_tag 'session[status]',1, false, :class => 'new'  %>禁用
    </div>
  </div>
  <div class="control-group">
    <div class="controls">
      <input type="hidden" name="id" id="id" value="<%= @link.id %>" />
      <button type="submit" class="btn">修改</button>
    </div>
  </div>
</fieldset>
<% end %>
<!---->
